package com.zenithmind.classroom.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

/**
 * 章节创建DTO
 * 
 * @author ZenithMind Team
 * @since 2025-01-09
 */
@Data
@Schema(description = "章节创建DTO")
public class ChapterCreateDTO {

    /**
     * 课程ID
     */
    @Schema(description = "课程ID")
    @NotBlank(message = "课程ID不能为空")
    private String courseId;

    /**
     * 章节标题
     */
    @Schema(description = "章节标题")
    @NotBlank(message = "章节标题不能为空")
    @Size(max = 200, message = "章节标题长度不能超过200字符")
    private String title;

    /**
     * 章节描述
     */
    @Schema(description = "章节描述")
    private String description;

    /**
     * 章节编号
     */
    @Schema(description = "章节编号")
    @Min(value = 1, message = "章节编号不能小于1")
    private Integer chapterNumber;

    /**
     * 章节类型（1:普通章节, 2:实践章节, 3:测试章节）
     */
    @Schema(description = "章节类型（1:普通章节, 2:实践章节, 3:测试章节）")
    @Min(value = 1, message = "章节类型值不能小于1")
    @Max(value = 3, message = "章节类型值不能大于3")
    private Integer type;

    /**
     * 预计学习时长（分钟）
     */
    @Schema(description = "预计学习时长（分钟）")
    @Min(value = 0, message = "预计学习时长不能为负数")
    private Integer estimatedMinutes;

    /**
     * 是否免费（0-否，1-是）
     */
    @Schema(description = "是否免费（0-否，1-是）")
    private Integer isFree;

    /**
     * 是否立即发布
     */
    @Schema(description = "是否立即发布")
    private Boolean publishNow;

    /**
     * 排序值
     */
    @Schema(description = "排序值")
    private Integer sortOrder;
}
